<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			div{
				width: 200px;
				border: 1px solid red;
			}
			#n{
				height: 50px;
			}
			#nList{
				height: 300px;
				overflow: scroll;
				position: fixed;
				top:20px;
				left:40%;
			}
			
		</style>
	</head>
	<body>
		<div id="n"></div>
		<div id="nList"></div>
		<input type="button" value="开始抽奖" onclick="start()"/>
		<input type="button" value="暂停！" onclick="stop()"/>
		//disabled="disabled
		<script type="text/javascript">
			var data3=["丁帅","董志豪","冯乾刚","付振帅","谷利华","郭鹏程","郭永亮","郭子玉","韩科达","胡苏超","靳振宇","李博文","李光辉","李少华","李思念","李彦锋","李一帆","刘会","刘永康","马宏亮","慕京龙","牛超凡","秦琳坤","秦智健","施佳佳","王豪","王鑫雨","王昱凯","徐哲","许振洋","杨敬一","杨盟","张栋帅","张林凯","张霖茂","张鹏","张韶飞","张帅龙","张晓龙","张轶萧","赵斌","赵世豪","朱冬冬"];
			var n=document.getElementById("n");
			var nList=document.getElementById("nList");
			var dsq,num;
			function start(){
				num=parseInt(Math.random()*data3.length);
				console.log(data3[num]);
				n.innerHTML=data3[num]+":"+data3.length;				
				//怎么让抽到的人名跳动  定时器
				dsq=window.setTimeout("start()",30);
			}
			function stop(){
				//抽到的列表，暂停的时候放进去
				nList.innerHTML+=data3[num]+"<br/>";
				//2个参数 要删除的下标 删除的数量
				data3.splice(num,1);
				window.clearTimeout(dsq);
			}
			//怎么去掉重复的人？
			//把已经抽到的人从数组删除
			
		</script>
	</body>
</html>
